package com.ipad.sql;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

import com.greendao.gen.DaoMaster;
import com.greendao.gen.TestBeanDao;
import com.ipad.bean.TestBean;

import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.database.StandardDatabase;


/**
 * Created by Administrator on 2018/12/3.
 */

public class MyOpenhepler extends DaoMaster.DevOpenHelper{
    public MyOpenhepler(Context context, String name) {
        super(context, name);
    }

    public MyOpenhepler(Context context, String name, SQLiteDatabase.CursorFactory factory) {
        super(context, name, factory);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
//        super.onUpgrade(db, oldVersion, newVersion);
        MigrationHelper.migrate(new StandardDatabase(db), TestBeanDao.class);

    }
}
